Hybrid integration of software development kit with secure execution environment

ABSTRACT

A portable communication device may include a mobile application executing in an application execution environment and a secure application executing in a trusted execution environment. The secure application may receive, from the mobile application, a storage request to store sensitive data. The storage request may include an encrypted data type identifier and an encrypted sensitive data. The secure application may decrypt the encrypted data type identifier and the encrypted sensitive data using a transport key, and re-encrypt the sensitive data using a storage key. The re-encrypted sensitive data can then be stored in a memory of the portable communication device which is outside the trusted execution environment.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a non-provisional of and claims the benefit to U.S. Provisional Patent App. No. 62/098,788, filed Dec. 31, 2014, which is herein incorporated by reference in its entirety for all purposes.

BACKGROUND

Card emulation technology has allowed mobile devices (e.g., mobile phones) to interact with access devices to perform transactions without requiring the use of a secure element. However, without using a secure element to safeguard the security sensitive operations involved in a transaction, sensitive data such as account credentials can be exposed to malware or rouge applications.

Embodiments of the disclosure address this and other problems, individually and collectively.

BRIEF SUMMARY

Embodiments of the present disclosure provide techniques for enhancing the security of a portable communication device without requiring the use of a secure element. To protect security sensitive functions and sensitive data, a secure application implementing security sensitive functions is executed in a trusted execution environment. An application program interface is provided to allow a mobile application executing in the application execution environment of the portable communication device to invoke the security sensitive functions of the secure application. The secure application can manage sensitive data for the mobile application, and perform encryption and decryption of the sensitive data such that the sensitive data is not store in the clear outside the trusted execution environment.

Some embodiments provide a portable communication device. The portable communication device comprises one or more processor circuits. The portable communication device also comprises one or more memory units coupled to the one or more processor circuits. The one or more memory units store computer readable code implementing a secure application in a trusted execution environment. The computer readable code, when executed by the one or more processor circuits, performs receiving, by the secure application from a mobile application executing in an application execution environment, a first storage request to store first sensitive data. The first storage request includes a first encrypted data type identifier and first encrypted sensitive data. The computer readable code, when executed by the one or more processor circuits, also performs decrypting, by the secure application, the first encrypted data type identifier and the first encrypted sensitive data using a communication device transport key. The computer readable code, when executed by the one or more processor circuits also performs determining, by the secure application, that the first data type identifier indicates the first sensitive data to store is a cryptogram generation key. The computer readable code, when executed by the one or more processor circuits, also performs re-encrypting, by the secure application, of the first sensitive data using a key-storage key to generate a re-encrypted cryptogram generation key. The computer readable code, when executed by the one or more processor circuits also performs storing the re-encrypted cryptogram generation key outside the trusted execution environment.

Some embodiments provide a method for managing sensitive data in a portable communication device having a mobile application executing in an application execution environment and a secure application executing in a trusted execution environment. The method comprises receiving, by the secure application from the mobile application, a storage request to store sensitive data. The storage request includes an encrypted data type identifier and encrypted sensitive data. The method also comprises decrypting, by the secure application, the encrypted data type identifier and the encrypted sensitive data using a transport key. The method also comprises determining, by the secure application, that the data type identifier indicates the sensitive data is a cryptogram generation key. The method also comprises re-encrypting, by the secure application, the sensitive data using a key-storage key to generate a re-encrypted cryptogram generation key. The method also comprises storing the re-encrypted cryptogram generation key in a memory of the portable communication device which is outside the trusted execution environment.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a system for conducting transactions, according to some embodiments.

FIG. 2 shows a block diagram of components of a portable communication device, according to some embodiments.

FIG. 3 shows a functional block diagram of an application program interface between an application execution environment and a trusted execution environment, according to some embodiments.

FIG. 4 shows a flow diagram of a mobile application storing sensitive data, according to some embodiments.

FIG. 5 shows a flow diagram of a mobile application conducting a transaction, according to some embodiments.

FIG. 6 shows a flow chart of a method for managing sensitive data on a portable communication device, according to some embodiments.

FIG. 7 shows a flow chart of a method for generating a transaction cryptogram on a portable communication device, according to some embodiments.

FIG. 8 shows a flow chart of a method for replenishing account parameters to a portable communication device, according to some embodiments.

DETAILED DESCRIPTION

Embodiments of the present invention provide techniques for enhancing the security of a portable communication device without requiring the use of a secure element. To protect security sensitive functions and sensitive data, a secure application implementing security sensitive functions is executed in a trusted execution environment. An application program interface is provided to allow a mobile application executing in the application execution environment of the portable communication device to invoke the security sensitive functions of the secure application. The secure application can manage sensitive data for the mobile application, and perform encryption and decryption of the sensitive data such that the sensitive data are not store in the clear outside the trusted execution environment.

Prior to discussing the embodiments, terms related to the embodiments are described.

A “communication device” may be a device that includes one or more electronic components (e.g., an integrated chip) that can communicate with another device. For example, a communication device can be a computing device that includes at least one processor coupled to a memory that stores instructions or code for execution by the processor. A “portable communication device” may be a communication device that may be transported and operated by a user, and may include one or more electronic components (e.g., an integrated chip). A portable communication device may provide remote communication capabilities to a network. The portable communication device can be configured to transmit and receive data or communications to and from other devices. A portable communication device may be in the form of a mobile device such as a mobile phone (e.g., smart phone, cellular phone, etc.), tablets, portable media player, personal digital assistant devices (PDAs), wearable computing device (e.g., watch, health monitoring device such as a fitness tracker, etc.), electronic reader device, etc., or in the form of a card (e.g., smart card) or a fob, etc. Examples of portable communication devices may also include portable computing devices (e.g., laptops, netbooks, ultrabooks, etc.). A portable communication device may also be in the form of a vehicle (e.g., an automobile), or be integrated as part of a vehicle (e.g., an infosystem of a vehicle).

A “server computer” may include a powerful computer or cluster of computers. For example, the server computer can be a large mainframe, a minicomputer cluster, or a group of servers functioning as a unit. In one example, the server computer may be a database server coupled to a Web server. The server computer may be coupled to a database and may include any hardware, software, other logic, or combination of the preceding for servicing the requests from one or more client computers. The server computer may comprise one or more computational apparatuses and may use any of a variety of computing structures, arrangements, and compilations for servicing the requests from one or more client computers.

An “issuer” may typically refer to a business entity (e.g., a bank) that maintains an account for a user that is associated with a portable communication device such as an account enrolled in a mobile application installed on a portable communication device. An issuer may also issue account parameters associated with the account to a portable communication device. An issuer server may be associated with the issuer and may perform some or all of the functions of the issuer on behalf of the issuer.

A “merchant” may typically be an entity that engages in transactions and can sell goods or services, or provide access to goods or services. An access device, described below, may be associated with the merchant and may perform some or all of the functions of the merchant on behalf of the merchant.

An “acquirer” may typically be a business entity (e.g., a commercial bank) that has a business relationship with a particular merchant or other entity. An acquirer server may be associated with the acquirer and may perform some or all of the functions of the acquirer on behalf of the acquirer. Some entities can perform both issuer and acquirer functions. Some embodiments may encompass such single entity issuer-acquirers.

An “access device” may be any suitable device for communicating with a merchant computer or transaction processing network server, and for interacting with a transaction device (e.g., a payment device), a user computer apparatus, and/or a user mobile device. An access device may generally be located in any suitable location, such as at the location of a merchant. An access device may be in any suitable form. Some examples of access devices include point-of-sale (POS) devices, cellular phones, PDAs, personal computers (PCs), tablet PCs, hand-held specialized readers, set-top boxes, electronic cash registers (ECRs), automated teller machines (ATMs), virtual cash registers (VCRs), kiosks, security systems, access systems, websites hosted on a computing device, and the like. An access device may use any suitable contact or contactless mode of operation to send or receive data from, or associated with, a portable communication device. In some embodiments, where an access device may comprise a POS terminal, any suitable POS terminal may be used and may include a reader, a processor, and a computer-readable medium. A reader may include any suitable contact or contactless mode of operation. For example, exemplary card readers can include radio frequency (RF) antennas, optical scanners, bar code readers, or magnetic stripe readers to interact with a portable communication device.

An “authorization request message” may be an electronic message that is sent to request authorization for a transaction. The authorization request message can be sent to a transaction processing network server and/or an issuer of an account. An authorization request message according to some embodiments may comply with ISO 8583, which is a standard for systems that exchange electronic transaction information associated with a transaction made by a user using a transaction device or transaction account. The authorization request message may include information that can be used to identify an account. An authorization request message may also comprise additional data elements such as one or more of a service code, an expiration date, etc. An authorization request message may also comprise transaction information, such as any information associated with a current transaction, such as the transaction amount, merchant identifier, merchant location, etc., as well as any other information that may be utilized in determining whether to identify and/or authorize a transaction. The authorization request message may also include other information such as information that identifies the access device that generated the authorization request message, information about the location of the access device, etc.

An “authorization response message” may be an electronic message reply to an authorization request message. The authorization response message can be generated by an issuing financial institution or a transaction processing network server. The authorization response message may include, by way of example only, one or more of the following status indicators: Approval—transaction was approved; Decline—transaction was not approved; or Call Center—response pending more information, merchant must call the toll-free authorization phone number. The authorization response message may also include an authorization code, which may be a code that a credit card issuing bank returns in response to an authorization request message in an electronic message (either directly or through the transaction processing network server) to the merchant computer that indicates approval of the transaction. The code may serve as proof of authorization. As noted above, in some embodiments, a transaction processing network server may generate or forward the authorization response message to the merchant.

The term “authentication” and its derivatives may refer to a process by which the credential of an endpoint (including but not limited to applications, people, devices, processes, and systems) can be verified to ensure that the endpoint is who they are declared to be.

The term “verification” and its derivatives may refer to a process that utilizes information to determine whether an underlying subject is valid under a given set of circumstances. Verification may include any comparison of information to ensure some data or information is correct, valid, accurate, legitimate, and/or in good standing.

A “token” may include a substitute identifier for some information. For example, a transaction token may include an identifier for a transaction account that is a substitute for an account identifier, such as a primary account number (PAN). For instance, a token may include a series of alphanumeric characters that may be used as a substitute for an original account identifier. For example, a token “4900 0000 0000 0001” may be used in place of a PAN “4147 0900 0000 1234.” In some embodiments, a token may be “format preserving” and may have a numeric format that conforms to the account identifiers used in existing transaction processing networks (e.g., ISO 8583 financial transaction message format). In some embodiments, a token may be used in place of a PAN to initiate, authorize, settle or resolve a transaction. The token may also be used to represent the original credential in other systems where the original credential would typically be provided. In some embodiments, a token value may be generated such that the recovery of the original PAN or other account identifier from the token value may not be computationally derived. Further, in some embodiments, the token format may be configured to allow the entity receiving the token to identify it as a token and recognize the entity that issued the token.

A “real account identifier” may include an original account identifier associated with a account. For example, a real account identifier may be a primary account number (PAN) issued by an issuer for a card account (e.g., credit card, debit card, etc.). For instance, in some embodiments, a real account identifier may include a sixteen digit numerical value such as “4147 0900 0000 1234.” The first six digits of the real account identifier (e.g., “414709”), may represent a real issuer identifier (BIN) that may identify an issuer associated with the real account identifier.

“Account parameters” may refer to information relating to an account that can be used to conduct a transaction on the account. Examples of account parameters may include information that can be used to identify an account of the user (e.g., real account identifier, alternate account identifier, token, etc.), data or information relating to the status of the account, one or more keys that are used to generate cryptographic information, data or information relating to the one or more keys, etc. An account parameter can be semi-static or dynamic. A dynamic account parameter may be an account parameter that has a limited lifespan, and which once expired, can no longer be used to conduct a transaction until the account parameter is replenished, refreshed, or renewed. A dynamic account parameter may be replenished frequently during the lifetime of an account. A semi-static account parameter may be an account parameter that has an extended lifespan that is longer than a dynamic account parameter, and can be replenished less frequently than a dynamic account parameter or not at all during the lifetime of the account.

A “key” may refer to a piece of information that is used in a cryptographic algorithm to transform input data into another representation. A cryptographic algorithm can be an encryption algorithm that transforms original data into an alternate representation, or a decryption algorithm that transforms encrypted information back to the original data. Examples of cryptographic algorithms may include triple data encryption standard (TDES), data encryption standard (DES), advanced encryption standard (AES), etc.

A “cryptogram generation key” may refer to a key that is used to generate a cryptogram. For example, a cryptogram can be generated by encrypting data with a cryptogram generation key. In some embodiments, a cryptogram generation key can be a limited-use key.

A “limited-use threshold” may refer to a condition that limits the usage of a piece of information. A limited-use threshold may be exceeded or exhausted when the underlying condition is met. For example, a limited-use threshold may include a time-to-live that indicates an amount of time that a piece of information is valid for, and once that amount of time has elapsed, the limited-use threshold is exceeded or exhausted, and the piece of information may become invalid and may no longer be used. As another example, a limited-use threshold may include a number of times that a piece of information can be used, and once the piece of information has been used for that number of times, the limited-use threshold is exceeded or exhausted, and the piece of information may become invalid and may no longer be used.

A “limited-use key” may refer to a key that is used in a cryptographic algorithm which is operably limited by at least one limited-use threshold.

A “transaction processing network” may include a network that can process and route transaction request messages. An exemplary transaction processing network may include data processing subsystems, servers, networks, and operations used to support and deliver authorization services, exception file services, transaction scoring services, and clearing and settlement services. An exemplary transaction processing network may include VisaNet™. Transaction processing networks such as VisaNet™ are able to process credit card transactions, debit card transactions, and other types of commercial transactions. VisaNet™, in particular, may include a VIP system (Visa Integrated Payments system) which processes authorization requests and a Base II system which performs clearing and settlement services.

An “application execution environment” may be an environment on a computing device for executing an application. The application execution environment may be supported in software, hardware, firmware or a combination thereof. Applications executed in the application execution environment are not isolated from other applications executed in the application execution environment, and thus can be vulnerable to malware and other malicious code running in the application execution environment.

A “trusted execution environment” (TEE) may be a secure environment on the computing device for securely executing an application. A trusted execution environment may be supported in software, hardware, firmware or a combination thereof. The trusted execution environment may be implemented so that its execution and data space are isolated from other environments executing code on the computing device (e.g., the application execution environment). For example, the trusted execution environment may have dedicated or protected processing and system resources, such as secure storage and protected memory buffers. In some implementations, a trusted execution environment may have paging structures, exception handlers, protected memory regions and hardware resources dedicated or associated with the trusted execution environment. A trusted execution environment is not limited to but may be implemented using virtualization technology.

An “attestation value” is a value or string representing the state of a software or hardware component. An attestation value can be used to indicate the presence, identity, and integrity of a component installed or available on a device.

Details of some embodiments of the present invention will now be described.

FIG. 1 shows a system 100 for conducting transactions, according to some embodiments. System 100 may include a cloud-based transaction platform (CBP) 170 and a mobile application server 120 to manage cloud-based transactions conducted using portable communication device 110. CBP 170 may be referred to as a remote computer, and may be implemented using one or more computing devices or computers, such as one or more server computers, and can be associated with or be operated by a cloud-based service provider such as an issuer, transaction processor, and/or other suitable entities. CBP 170 may manage cloud-based accounts, provide verification functions for cloud-based transactions, manage lifecycle messages from an issuer server 160 or from the mobile application server 120, as well as initiate lifecycle management events. CBP 170 may also assist the issuer server 160 with post transaction functionalities to mitigate the risk against counterfeit account parameters, and limit the exposure on account parameters stored on the device. For example, CBP 170 can be used to facilitate requests from the issuer server 160 for periodic post transaction verification of transactions and/or validation of account parameters replenishment requests using post transaction information.

CBP 170 may also implement a set of key management functions that manages issuer master derivation keys (MDKs) from which cryptogram generation keys such as limited-use keys (LUKs) for cloud-based transactions are derived. CBP 170 may implement a set of provisioning functions that manages the preparation and delivery of cloud-based account parameters (e.g., token or other account identifier, initial cryptogram generation key or LUK and associated key index, etc.) to the mobile application server 120 for the initial setup of a mobile application on the portable communication device 110. CBP 170 may also manage the cloud-based accounts for processing by the issuer server 160, and may perform active account management functions such as functions to generate account parameters based on requests or the risk profile of the cloud-based account per CBP 170 risk management parameters. CBP 170 may also maintain the account status for each cloud-based account, and manage the replenishment or refreshing of the account parameters.

In some embodiments, CBP 170 may also implement or be provided with access to a token service and/or a token vault. The token service can be used to generate, process, and maintain tokens, which are substitute identifiers for account identifiers. During a transaction, instead of using a real account identifier (e.g., a primary account number (PAN)) to identify the account of the user, a token can be used instead to identify the account. By using a token as a substitute for an account identifier, the risk of comprising real account information can be mitigated. A token may have its own set of use restrictions, and the token service may manage the deployment and usage of the tokens according to their use restrictions. The token service may be in communication with the token vault where the generated tokens are stored. Specifically, the token vault may maintain a mapping between a token and the real account identifier (e.g., PAN) represented by the token. During transaction processing, the token vault may retrieve the real account identifier or PAN associated with the token.

The mobile application server 120 is used to facilitate communications between a mobile application executing on the portable communication device 110 and other entities in the system 100, such as CBP 170 and/or the issuer server 160, etc. The mobile application server 120 may communicate with the portable communication device 110 via a communications network 115 such as the Internet. In some embodiments, portable communication device 110 may not always have constant network connectivity, and thus one of the primary roles of the mobile application server 120 is to intermediate requests between the mobile application and the other entities in the system 100 to ensure that requests and responses involving the mobile application are fulfilled as soon as network connectivity to portable communication device 110 is established. The mobile application server 120 may be referred to as a remote computer, and may be implemented using one or more computing devices or computers such as one or more server computers, and can be associated with or be operated by the provider of mobile application. The provider of mobile application can be, for example, an issuer, a bank, a third-party mobile wallet provider, a merchant, or other suitable entities. In some embodiments, the mobile application server 120 can be associated with or be operated by the same entity as CBP 170, or they can be operated by separate entities. Although the mobile application server 120 is illustrated as a separate logical entity in FIG. 1, some or all of the functionalities of the mobile application server 120 may be integrated as part of CBP 170. Examples of the mobile application server 120 may include mobile banking platforms and mobile wallet platforms.

In some embodiments, the mobile application server 120 may implement authentication functionalities to authenticate the portable communication device 110 when the portable communication device 110 communicates with the other entities in the system 100 via the mobile application server 120. The authentication functionalities may ensure that a portable communication device communicating with the system is an authorized portable communication device and/or a portable communication device that has not been hacked, infected with malware or virus, or otherwise been compromised. For example, the mobile application server 120 may perform, request, or facilitate a device fingerprint of the portable communication device 110 to capture the state of the portable communication device 110 when the portable communication device 110 communicates with the mobile application server 120. The fingerprint of the portable communication device 110 may capture information about the operating system and version, applications installed on the portable communication device 110, memory usage, whether portable communication device 110 has been jail-broken, device identifiers such as a portable communication device identifier, and/or other suitable device characteristics.

The mobile application server 120 may verify the device fingerprint of portable communication device 110 for each communication session established with the portable communication device 110 or periodically (e.g., once every five communication sessions, once a month, etc.). If the device fingerprint of the portable communication device 110 indicates that the portable communication device 110 is not an authorized device for an account (e.g., the portable communication device requesting replenishment of account parameters is a different device than the original device that was used to enroll the account), or if the device fingerprint indicates that the portable communication device may potentially be hacked, the mobile application server 120 may prevent the portable communication device 110 from communicating with the system 110 and may send an alert to the issuer server 160 that the portable communication device 110 may have been compromised. In some embodiments, the device fingerprint can be in the form of a set of attestation values representing the state of the portable communication device 110.

The mobile application server 120 may perform enrollment functions to enroll a mobile cardholder into a cloud-based transactions program, and provide a set of provisioning functions that facilitates the preparation and delivery of the account parameters to the mobile application executing on the portable communication device 110. The mobile application server 120 may perform account parameters replenishment functions to facilitate the account parameter replenishment process for the cloud-based account provisioned on portable communication device 110, and lifecycle management functions that manage lifecycle messages from the issuer server 160, CBP 170, and/or the mobile application. The mobile application server 120 may also perform post-transaction functions to mitigate the risk against counterfeit account parameters, and to limit the exposure on account parameters stored on portable communication device 110, such as facilitating periodic post transaction verification of transactions or the use of post transaction information to validate account parameters replenishment requests.

The portable communication device 110 can be used to conduct cloud-based transactions facilitated by CBP 170 and/or the mobile application server 120. The components in the portable communication device 110 may include device hardware, a mobile operating system (OS), and an applications environment in which the mobile application may operate, as further described below. For example, the device hardware may include a contactless interface that can interact with a contactless reader of an access device 130. Examples of the contactless interface may include one or more radio frequency (RF) transceivers that can send and receive communications using near-field communications (NFC), or other radio frequency or wireless communication protocols such as Bluetooth, Bluetooth low-energy (BLE), WiFi, iBeacon, etc. In some embodiments, the contactless interface may include an optical interface (e.g., a display screen) to present transaction information in the form of an image such as a quick response (QR) code, or bar code, etc. to the contactless reader of the access device when the contactless reader includes an optical code scanner or reader.

The application execution environment of portable communication device 110 may host a mobile application, which may be provided by a mobile application provider. For example, if the provider of mobile application is an issuer, then the mobile application may be a mobile banking application or a separate mobile payment application. If the provider is a mobile wallet provider, such as a mobile network operator or third-party wallet provider that supports multiple issuers, then the mobile application may be a mobile wallet application. For merchants, the mobile application may be a merchant's own mobile application from which consumers can conduct e-commerce or point of sale transactions with that merchant, or may be a mobile wallet application that supports multiple merchants.

According to some embodiments, the mobile application may include on-device cloud-based transaction software (e.g., can be in the form of a software developer kit (SDK)) integrated into the mobile application to support cloud-based transaction functionalities. The on-device cloud-based transaction software may perform functions to facilitate cloud-based transactions such as to take the account parameters (e.g., LUK), generate transaction cryptograms, and deliver them to the mobile operating system for transmission over the contactless interface. The on-device cloud-based transaction software may also manage the initial service profile parameters (e.g., limited-use thresholds) that are provided after an account has been provisioned to ensure that requests for account parameter replenishment and other account parameter management activities are initiated.

The mobile application may perform functions to manage the risk profile of the cloud-based account, maintain the account status, and replenish account parameters for each cloud-based account based on the on-device threshold management parameters. The mobile application may also manage lifecycle messages from the issuer server 160 or lifecycle messages from the mobile application server 120. The mobile application may also perform a set of functions to enroll the mobile cardholder into the cloud-based transactions program, and perform a set of functions that manages the receiving and configuration of the cloud-based account parameters received from the mobile application server 120. The mobile application may also provide consumer device cardholder verification method (CDCVM) functions for cloud-based transactions, and perform a set of functions that processes and responds to messages in support of post-transaction processing to limit the exposure of account parameters stored on the portable communication device. For example, post-transaction processing may include periodic post-transaction verification of transactions or using post-transaction information to validate account parameters replenishment requests.

In secure element based implementations, a contactless application (e.g., a mobile wallet or payment application for contactless transactions) using a contactless interface to communicate with a contactless reader of an access device would have to be coded for and be executed on a secure element in order to gain access to the contactless interface. In some embodiments, the portable communication device 110 may include a mobile operating system (OS) that implements a set of card emulation application programming interfaces (APIs), such as host card emulation (HCE) APIs, to allow the mobile application to gain access to the contactless interface of the portable communication device 110 without requiring the use of a secure element. For example, the card emulation APIs may be coded for and be executed from the mobile OS of the portable communication device 110, and may include programming function calls to allow the mobile application to receive, process, and respond to transaction communications (e.g., Application Protocol Data Unit (ADPU) commands sent from the contactless reader). In this manner, the portable communication device 110 is able to conduct contactless transactions without requiring access to a secure element on the portable communication device 110.

Once the portable communication device 110 and the mobile application 110 have been provisioned with the account parameters, then the portable communication device 110 can conduct cloud-based transactions by interacting with the contactless reader the of access device 130 (e.g., at a merchant point-of-sale (POS) location). The contactless reader may include one or more RF transceivers that can send and receive communications using NFC or other radio frequency or wireless communication protocols such as Bluetooth, BLE, Wi-Fi, iBeacon, etc. In some embodiments, the contactless reader may include an optical code scanner or reader to conduct transactions using quick response (QR) codes, bar codes, etc. The access device 130 may also include a POS acceptance device and/or an electronic cash register.

To conduct a cloud-based transaction, a user of the portable communication device 110 may place the portable communication device 110 in proximity to the contactless reader of the access device 130, or display an image such as a QR code or bar code on a screen of the portable communication device 110 for scanning by the contactless reader of the access device 130. The portable communication device 110 may provide the access device 130 with an identifier (e.g., an account identifier such as a PAN, an alternate account identifier such as an alternate PAN, or a token, etc.) to identify the account of the user and additional information such as the limited-use account parameters or information derived from the limited-use account parameters (e.g., transaction cryptograms generated from a cryptogram generation key such as an LUK). For example, in some embodiments, an account identifier or token, and additional information (e.g., a transaction cryptogram, account parameters, etc.) can be transmitted to the access device 130 in APDU responses that are responsive to a series of APDU commands received from the access device 130. In some embodiments, an account identifier or token, and the additional information can be encoded in a QR code or bar code that is scanned and processed by the access device 130 to retrieve the encoded information. The access device 130, or a merchant computer coupled to the access device 130, may then generate an authorization request message including the account identifier or token, and additional information such as a transaction cryptogram and other transaction data, and forward the authorization request message to an acquirer server 140 associated with the merchant. The authorization request message can then be sent by the acquirer server 140 to a transactions processing network server 150.

The transaction processing network server 150 may include data processing subsystems, networks, and operations used to support and deliver authorization services, exception file services, transaction scoring services, and clearing and settlement services. Transaction processing networks can process credit card transactions, debit card transactions, and other types of transactions. Certain transaction processing networks may include a system that processes authorization requests and a base system which performs clearing and settlement services.

Upon receiving the authorization request message, the transaction processing network 150 may forward the authorization request message received from the acquirer server 140 to the issuer server 160 of the issuer holding the account of the user of the portable communication device 110. After the issuer server 160 receives the authorization request message, the authorization request message may be parsed, and the information in the authorization request message may be verified. For example, the issuer server 160 may verify that the transaction cryptogram was generated by a valid LUK, and that the set of one or more limited-use thresholds associated with the LUK has not been exceeded. In some embodiments, some or all of the information in the authorization request message can also be sent to CBP 170 for verification and processing. For example, if the issuer server 160 does not have the capability to verify the transaction cryptogram, then the transaction processing network 150 or issuer server 160 may forward the transaction cryptogram to CBP 170 for verification.

An authorization response message is then sent back to the transaction processing network 150 to indicate whether the current transaction is authorized (or not authorized). The transaction processing network 150 can forward the authorization response message to the acquirer server 140. In some embodiments, the transaction processing network 150 may decline the transaction even if the issuer server 160 authorized the transaction, for example, depending on a value of a fraud risk score or depending if limited-use account parameters are verified by CBP 170. The acquirer server 140 can send the authorization response message to the access device 130. The authorization response results, which may include transaction data for the transaction can be displayed by the access device 130, or be printed out on a physical receipt.

At the end of the day, a clearing and settlement process can be conducted by the transaction processing network 150. A clearing process is a process of exchanging financial details between an acquirer and an issuer to facilitate posting to a user's transaction account and reconciliation of the user's settlement position. Any of the acquirer server 140, the transaction processing network 150, the issuer server 160, the CBP 170, and/or the mobile application server 120 may be referred to as a remote computer, and may include one or more computing devices such as one or more computers or server computers to enable the entity to communicate with the other entities in the system 100, and/or to perform one or more of the functions described herein.

In other embodiments of system 100, the components or elements can be combined, or their functions may be separated into other computational components. For example, in some embodiments, the mobile application server 120 may be part of the issuer server 160, and/or the CBP 170, and/or the transaction processing network server 150, and these components need not exist as separate entities.

FIG. 2 is a block diagram of components of a portable communication device 201, according to some embodiments. The portable communication device 201 may be configured similar to the portable communication device 110 of FIG. 1, and may be implemented in the system 100. Portable communication device 201 may include device hardware 204 coupled to a memory unit 202. The device hardware 204 may include a processor circuit 205, a communication circuit 209, a user interface 206, a display 207 (which may be part of user interface 206), and a contactless interface 208. The processor circuit 205 can be implemented as one or more integrated circuits (e.g., one or more single core or multicore microprocessors and/or microcontrollers), and is used to control the operation of the portable communication device 201. The processor 205 can execute a variety of programs in response to program code or computer-readable code stored in memory 202, and can maintain multiple concurrently executing programs or processes. The communication circuit 209 may include one or more RF transceivers and/or connectors (e.g., Wi-Fi or cellular) that can be used by portable communication device 201 to communicate with other devices and/or to connect with external networks (e.g., communication network 115). The user interface 206 can include any combination of input and output elements to allow a user to interact with and invoke the functionalities of the portable communication device 201. In some embodiments, the display 207 may be part of the user interface 206.

The contactless interface 208 may include one or more RF transceivers (e.g., NFC) to interact with a contactless reader of an access device to conduct a transaction (e.g., payment transaction, access transaction, information exchange, etc.). In secure element based implementations, only a secure element (not shown) may have access to the contactless interface 208. In some embodiments, the contactless interface 208 can be accessed by the mobile OS 214 using host card emulation (HCE) APIs 216 without requiring the use of a secure element. In some embodiments, the display 207 can also be part of the contactless interface 208, and is used, for example, to perform transactions using QR codes, bar codes, etc.

The memory unit 202 can be implemented using any combination of any number of non-volatile memories (e.g., flash memory) and volatile memories (e.g., DRAM, SRAM), or any other non-transitory storage medium, or a combination thereof media. The memory unit 202 may store the mobile OS 214. In some embodiments, mobile OS 214 may implement a set of card emulation APIs 216 that can be invoked by mobile application 212 to access contactless interface 208 to interact with an access device. The memory unit 202 may also store an application execution environment 210 where one or more mobile applications reside including mobile application 212 (e.g., a transaction application such as a mobile wallet application, a payment application, a merchant application, etc.) to be executed by processor circuit 205. The application execution environment 210 contains application storage 215 that can be accessed by applications executing in the application execution environment 210.

The memory unit 202 may also implement a trusted execution environment 220 that is separate and isolated from the application execution environment 220. For example, applications executing in the application execution environment 210 may not directly access the memory of the trusted execution environment 220. As further described below, an application program interface (API) may provide communication of data between the application execution environment 210 and the trusted application execution environment 220. The trusted execution environment 220 may contain a secure application 222 that can perform encryption and decryption of tokens and keys (e.g., LUKs) using keys stored in a crypto library 226. The secure application 222 can also generate a cryptogram to conduct a transaction for the mobile application 212 using keys stored in the crypto library 226. As further described below, the crypto library 226 may store keys for data being transported to and from the mobile application 212, and keys for storing data in the application execution environment 210 of the memory unit 202. The trusted execution environment 220 may also contain a secure user interface (UI) 224 that can receive input from a user. The input received by the secure UI 224 may not be directly accessible by applications executing in the application execution environment 210.

According to some embodiments, mobile application 212 can integrated a software development kit (SDK) 213 that is provided by an application provider such as an issuer or transaction service provider. The SDK 213 may provide functionalities to communicate with a transaction service provider for services such as token request and account parameters replenishment. The SDK 213 may access an application program interface (API) for communicating information between the secure application 222 executing in the trusted execution environment 222 and the mobile application 212 executing in the application execution environment.

FIG. 3 shows a functional block diagram 300 of an application program interface 305 between an application execution environment 310 and a trusted execution environment 320, according to some embodiments. The portable communication devices 110 and 210 described above may implement the API 305 of FIG. 3. API 305 may provide a dedicated interface to allow an application executing in application execution environment 310 to communicate with and invoke functions implemented in trusted execution environment 320. As described above, the portable communication device may include a mobile application in the application execution environment 310 that uses host card emulation technology to communicate with an access device to conduct a transaction. However, without requiring the use of a secure element, sensitive data including account credentials (e.g., cryptogram generation key such as a limited-use key, token or other account identifier, and other account parameters or credentials) may be stored in the application storage of application execution environment 310 without the security safeguards provided by a secure element. As such, in order to protect the sensitive data, they are encrypted by the trusted execution environment 320 before being stored in the application storage of the application execution environment 310. At the time of a transaction, the mobile application can retrieve the encrypted sensitive data from the application storage, and passes the encrypted sensitive data to the trusted execution environment 320 via API 305. A secure application executing in the trusted execution environment 320 can decrypt the encrypted sensitive data including the account credentials, and generate a transaction cryptogram, which is then passed back to the mobile application via API 305. The account credentials and/or transaction cryptogram can then be transmitted to an access device to conduct a transaction.

The application execution environment 310 and the trusted execution environment 320 can be implemented in a memory unit 302 of a portable communication device. In some embodiments, the application execution environment 310 and the trusted execution environment 320 can be implemented as separate physical or logical components to provide physical or logical isolation between the two environments. For example, the application execution environment 310 can be implemented in one physical memory component, and the trusted execution environment 320 can be implemented in a separate physical memory component. The trusted execution environment can be provided and built into the portable communication device 110 or 220 by the portable communication device manufacturer, or by a provider or manufacturer of a component of the portable communication device (e.g., a manufacturer of the processor, developer of the operating system, etc.).

The various components of the application execution environment 310 and trusted execution environment 320 will now be described. The application execution environment 310 may include a mobile application 312 (e.g., a mobile wallet or payment application) and application storage 315. The mobile application 312 may include a software development kit (SDK) 313 that implements functionalities such as token request and account parameter replenishment (e.g., to replenish a cryptogram generation key such as a LUK) to conduct cloud-based transactions. As described above, the mobile application 312 may access a host card emulation driver that can be used to access an NFC controller of the portable communication device to communicate with a contactless interface of an access device to conduct a transaction. Application storage 315 can be used to store sensitive data including account credentials such as a token or other account identifier, cryptogram generation key such as LUK, etc.

The trusted execution environment 320 may include a secure application 322, a crypto library 326, and a secure UI 324. The secure application 322 may provide security sensitive functions and secure storage of sensitive data and information used by the mobile application 312. For example, secure application 322 may implement encryption and decryption functionalities (e.g., using 3DES, DES, AES, etc. or other suitable encryption/decryption algorithms) and may respond to encryption/decryption requests from mobile application 312 via API 305. In some embodiments, the secure application 322 may ignore requests that are not received from the mobile application 312, or ignore requests that are not received via API 305.

In some embodiments, the secure application 322 can be locked to the mobile application 312 such that no other application can call the secure application 322 during crypto operations (e.g., encryption and decryption). This can allow a series of crypto operation calls to be performed by the secure application 322 for a series of sensitive data.

The secure application 322 may also store portable communication device certificates (e.g., hash of device International Mobile Equipment Identity (IMEI) number or a serial identifier). The device certificates can be treated as sensitive data and may be encrypted by the secure application 322. The secure application 322 may also provide a certificate rotation mechanism. For example, the portable communication device may be pre-loaded with transaction service provider certificates including a Root Certificate, a Signature Certificate, and an Encryption Certificate. The Root Certificate on the portable communication device can enable secure rotation of the Signature and Encryption certificates. New certificates can be validated as being trusted certificates using the Root Certificate.

The crypto library 326 may contain multiple encryption keys of different types used by secure application 322. For example, the crypto library 326 may contain transport keys and storage keys. The transport keys may be used to encrypt sensitive data in transit to or from an external entity such as a remote server (e.g., a token service or cloud-based transaction service provider during token request or account parameters replenishment). The transport keys may include an encryption transport key that is used to decrypt or encrypt sensitive data (e.g., token or other account identifier, cryptogram generation key such as LUK, etc.) received from or sent to the external entity. The encryption transport key may provide end-to-end encryption of the sensitive data in addition to and on top of network layer encryption (e.g., Transport Layer Security (TLS) or Secure Sockets Layer (SSL)). In some embodiments, the sensitive data received from the external entity can be digitally signed by the external entity, and the transport keys stored in crypto library 32 may also include a signature transport key that is used to authenticate the identity of the external entity by verifying the digital signature. The transport keys can be provided by the manufacturer of the portable communication device or may be provided by a provider of the mobile application 312.

The storage keys are used to securely store data in the application storage 315. In some embodiments, the storage keys may be symmetric keys. As described in further detail below, sensitive data such as a token or LUK can be received by the portable communication device that is encrypted using a transport key by an external entity (e.g., remote server). This data may be passed to the secure application 322 from the mobile application 312 using API 305. The encrypted sensitive data can be decrypted by the secure application 322 using a transport key stored in the crypto library 326. The sensitive data is then re-encrypted by the secure application 322 using a storage key contained in the crypto library 326 before storing the sensitive data in application storage 315. For example, if the sensitive data is a token, the token may be encrypted using a token-storage key before storing the sensitive data in application storage 315. When the token is used at the time of a transaction, the token-storage key can be used to decrypt the token. If the sensitive data is a cryptogram generation key such as a LUK, the cryptogram generation key may be encrypted using a key-storage key before storing the sensitive data in application storage 315. When the cryptogram generation key is used at the time of a transaction, the key-storage key can be used to decrypt the cryptogram generation key.

In some embodiments, to provide support for different encryption/decryption algorithms, the crypto library 326 may provide support for padding different encryption types. As such, padding/un-padding of data for encryption/decryption can be handled by the crypto library 326 when the secure application 322 provides the padding type corresponding to a particular encryption/decryption algorithm to the crypto library.

The secure UI 324 may provide an interface for a user of the portable communication device to input sensitive data (e.g., to enter account information during enrollment to the cloud-based transaction or token service, or to enter a PIN, etc.). The secure UI 324 may be initiated for secure entry of sensitive information used by the mobile application 312. The input data received via secure UI 324 can be encrypted by the secure UI 324 and passed to the mobile application 312. Upon receiving a request from the mobile application 312, the secure application 322 can decrypt the input data for mobile application 312.

In some embodiments, the secure UI 324 can be provided by the manufacturer of the portable communication device, which can be a different entity than the application provider of mobile application 312. As such, a template structure can be defined to provide an interface to allow the secure UI 324 to pass input data to the mobile application. In some embodiments, the secure UI 324 may receive sensitive input data and package the sensitive input data into a template structure. Then, the whole template structure can be encrypted by the secure UI 324. The whole template structure can be provided to the mobile application 312. In some embodiments, the secure UI 324 can collect sensitive input data as separate fields and encrypts each field individually. The individual fields can be provided to mobile application 312. In such embodiments, the mobile application 312 can package the encrypted object fields into the template structure. The mobile application 312 can store the template structure including the encrypted object fields in the application storage 315. Upon request by the mobile application 312, the secure application 322 can decrypt each field of the template structure one by one, before calling an encryption operation.

As discussed above, API 305 provides an interface between the application execution environment 310 and the trusted execution environment 320, which allows mobile application 312 to access security sensitive functions implemented by secure application 322 executing in the trusted execution environment 320. The various functions supported by API 305 will now be described. In some embodiments, the various functions supported by API 305 that mobile application 312 can invoke may include one or more of: (1) an initialization function; (2) a re-initialization function; (3) a send sensitive data function; (4) a store sensitive data function; (5) a store local data function; (6) a retrieve local data function; (7) a cryptogram generation function; (8) an account parameter replenishment function; (9) a device attestation function; (10) a server attestation function; and (11) miscellaneous crypto function.

In some embodiments, mobile application 312 may invoke the initialization function to initialize the cryptographic system. The initialization function may prepare the crypto library 326 by loading the appropriate keys and encryption/decryption algorithms used by secure application 322. Mobile application 312 may also invoke the re-initialization function to re-initialize the cryptographic system during rotation operations, for example, to provide the secure application 322 with a new certificate or new keys.

The mobile application 312 may invoke the send sensitive data function to send sensitive data to an external entity (e.g., a remoter serve such as a cloud-based transaction server, an issuer server, or a transaction processing network server). When calling this function, the mobile application 312 may retrieve the sensitive data from the application storage 315 that the mobile application 312 wants to send to the external entity, and provide the sensitive data to the secure application 322. The sensitive data stored in application storage 315 may be encrypted by a storage key, which the mobile application 312 cannot decrypt. The mobile application 312 may provide the encrypted sensitive data with a data type identifier indicating the data type of the sensitive data to the secure application 322, such that the secure application 322 can properly decrypt the sensitive data. For example, depending on whether the data type identifier indicates the sensitive data is a cryptogram generation key (e.g., a LUK), or a token or other account identifier, the secure application 322 may use either a key-storage key or a token-storage key to decrypt the sensitive data. The secure application 322 can then re-encrypt the sensitive data using a transport key and provide the re-encrypted sensitive data back to the mobile application 312 for transmission over a network to the external entity. In some embodiments, the secure application 322 may also digitally sign the sensitive data using a certificate associated with the portable communication device.

The mobile application 312 may invoke the store sensitive data function to store sensitive data received from an external entity (e.g., a remote server such as a cloud-based transaction server, an issuer server, or a transaction processing network server) by the mobile application 312 over a network. The sensitive data can be, for example a cryptogram generation key (e.g., LUK), or a token or other account identifier. In some embodiments, the sensitive data received by the mobile application 312 may be encrypted by the external entity using a transport key. The sensitive data may also be signed by the external entity. When the mobile application 312 invoked this function, the mobile application may provide the encrypted and signed sensitive data to the secure application 322 with a data type identifier, and request the secure application 322 to securely store the sensitive data. The secure application 322 may decrypt the sensitive data using a transport key, verifying that the sensitive data was properly signed by the external entity using a certificate associated with the external entity, and then re-encrypt the sensitive data using a storage key based on the data type of the sensitive data. For example, when the data type identifier indicates that the sensitive data to store is a cryptogram generation key (e.g., LUK), the secure application 322 may re-encrypt the sensitive data using a key-storage key, and when the data type identifier indicates that the sensitive data to store is a token or other account identifier, the secure application 322 may re-encrypt the sensitive data using a token-storage key.

The mobile application 312 may invoke the store local data function to securely store local data. The mobile application 312 may invoke this function to store local data by providing the local data to store and a data type identifier of the local data to the secure application 322. The secure application 322 may encrypt the local data using a storage key selected from the crypto library 326 based on the data type identifier of the local data. The encrypted local data is returned back to the mobile application 322 for storage in the application storage 315. Examples of local data that can be stored using this function may include a previously provision token or other account identifier, user input data, or transaction verification log information that contains transaction data for each transaction conducted using the mobile application 322. For example, the transaction log data may include, for each transaction, a transaction timestamp, an unpredictable number received from an access device, am application transaction counter, a transaction type, a transaction amount, etc. In some embodiments, the transaction log data can be used during account parameters replenishment (e.g., to request a new LUK).

The mobile application 312 may invoke the retrieve local data function to retrieve encrypted local data from the application storage 315 and provide it to the secure application 322 for decryption. The mobile application 312 may provide the data type identifier for the local data with the encrypted local data to the secure application 322. The secure application 322 may decrypt the encrypted local data using a storage key selected from the crypto library 326 based on the data type identifier, and return the decrypted local data. Examples of local data that can be retrieved using this function may include a previously provision token or other account identifier, user input data, or transaction verification log information. In some embodiments, this function may not be used to retrieve a cryptogram generation key, because the cryptogram generation key may not be provided in the clear outside the trusted execution environment.

When conducting a transaction, the mobile application 312 may invoke the cryptogram generation function to generate a transaction cryptogram using a cryptogram generation key. When calling this function, the mobile application 312 may retrieve the encrypted cryptogram generation key (e.g., LUK) from the application storage 315, and provide the encrypted cryptogram generation key to the secure application 322. In some embodiments, transaction data such transaction amount, unpredictable number, transaction date, etc. (which may be received from an access device) can also be provide to the secure application 322. The secure application 322 may then decrypt the cryptogram generation key (e.g., LUK), and generate the transaction cryptogram by encrypting the transaction data or a static string with the cryptogram generation key. The secure application 322 returns the transaction cryptogram to the mobile application 312, and the mobile application 312 can provide the transaction cryptogram to an access device to conduct the transaction.

The mobile application 312 may invoke the account parameter replenishment function to request replenishment of a token or a cryptogram generation key from an external entity (e.g., a remote server such as a cloud-based transaction server, an issuer server, or a transaction processing network server). In order to authenticate the portable communication device and the mobile application 312 during the replenishment process, a hash value (e.g., a message authentication code) is computed over the transaction verification log stored on the portable communication device using the stored cryptogram generation key, and the hash value is provided to the external entity. The transaction verification log may contain transaction information for each transaction conducted using the current set of account parameters (e.g., current token, cryptogram generation key, etc.). The external entity may compute a hash value over its own record of the transactions that the mobile application 312 conducted using the current set of account parameters, and compare the hash values to determine that the portable communication device is the same device that had previously provisioned by the external entity. As such, when invoking this function, the mobile application 312 may provide the encrypted cryptogram generation key (e.g., LUK) and the transaction verification log to the secure application 322. The secure application 322 can decrypt the cryptogram generation key using a storage key, and generate a hash value over the transaction verification log using the cryptogram generation key. The hash value is then returned to the mobile application 312, and the mobile application 312 can send the hash value to the external entity to request the replenishment.

In some embodiments, the mobile application 312 or the external entity that the mobile application 312 communicates with (e.g., a remote server such as a cloud-based transaction server, an issuer server, or a transaction processing network server) may inquire about the current state of the portable communication device to ensure the portable communication device has not been hacked. For example, the mobile application 312 may invoke the device attestation function each time the mobile application 312 communicates with the secure application 322. The device attestation function can be called implicitly with another function call, and may return a set of attestation values representing the current state of the hardware and/or software of the portable communication device (e.g., OS version, hardware component identifiers, etc.). Similarly, the mobile application 312 may invoke the device attestation function in response to a demand from the remote server, for example, during provisioning, replenishment, or life cycle management.

For miscellaneous cryptographic operations, the mobile application 312 may invoke the miscellaneous crypto function to request the secure application 322 to perform cryptographic operations using certain cypher modes (e.g., data encryption standard (DES), triple DES (3DES), and Advanced Encryption Standard (AES) operations).

The various functions and operations supported by API 305 may be performed in combination or separately.

FIG. 4 shows a flow diagram 400 of a mobile application 402 receiving and storing sensitive data (e.g., token or other account identifier, cryptogram generation key such as a limited-use key, etc.), according to some embodiments. The flow diagram 400 (or portions thereof) may be performed when the mobile application 402 receives a token or other account identifier, or when the mobile application 402 receives a cryptogram generation key (e.g., a limited-use key) from a remote server 401 (e.g., a cloud-based transaction server, an issuer server, or a transaction processing network server). At step 411, server 401 may send a token or other account identifier (“Token_(En(tr))”) that is encrypted by server 401 using a transport key to the mobile application 402 running in an application execution environment on a portable communication device. In some embodiments, server 401 may also send a data type identifier to identify the sensitive data as a token or other account identifier.

The mobile application 402 can perform secure storage of the token by sending a storage request via an API to a secure application 403 executing in a trusted execution environment. At step 412, the mobile application 402 may send a storage request to the secure application 403 to securely store the token. The storage request may include Token_(En(tr)) and a data type identifier indicating that the data type of the sensitive data to store is a token (“Type(t)”) to the secure application 403. In some embodiments, the data type identifier can be encrypted as well.

In some embodiments, Token_(En(tr)) can be signed by server 401, and the mobile application 402 can verify that Token_(En(tr)) was signed by server 401 using a certificate associated with server 401 before requesting the secure application 403 to store the token. In some embodiments, the storage request sent by the mobile application 402 can include the signature, and the secure application 410 can be the one that verifies Token_(En(tr)) was signed by server 401 using a certificate associated with server 401

At step 413, the secure application 403 selects a transport key from the crypto library and decrypts Token_(En(tr)), and the data type identifier if encrypted. The secure application 403 determines that the data type identifier indicates the sensitive data to store is a token or other account identifier, and re-encrypts the token using a storage key selected from the crypto library. The storage key is selected based on the data type identifier. For example, since the data type of the sensitive data is a token, the secure application 403 selects a token-storage key to re-encrypt the token to generate the re-encrypted token (“Token_(En(t-s))”). At step 414, the secure application 403 stores the re-encrypted token Token_(En(t-s)) outside the trusted execution environment by returning Token_(En(t-s)) to the mobile application 402. At step 415, the mobile application 402 stores Token_(En(t-s)) in an application storage 404.

At step 416, server 401 may send a cryptogram generation key such as a limited-use key (“LUK_(En(tr))”) that is encrypted by server 401 using a transport key to the mobile application 402 running in an application execution environment on a portable communication device. In some embodiments, server 401 may also send a data type identifier to identify the sensitive data as a cryptogram generation key (e.g., a limited-use key).

The mobile application 402 can perform secure storage of the cryptogram generation key (e.g., a limited-use key) by sending a storage request via an API to the secure application 403 executing in the trusted execution environment. At step 417, the mobile application 402 may send a storage request to the secure application 403 to securely store the token. The storage request may include LUK_(En(tr)) and a data type identifier indicating that the data type of the sensitive data to store is a cryptogram generation key (“Type(k)”) to the secure application 403. In some embodiments, the data type identifier can be encrypted as well.

In some embodiments, LUK_(En(tr)) can be signed by server 401, and the mobile application 402 can verify that LUK_(En(tr)) was signed by server 401 using a certificate associated with server 401 before requesting the secure application 403 to store the token. In some embodiments, the storage request sent by the mobile application 402 can include the signature, and the secure application 410 can be the one that verifies LUK_(En(tr)) was signed by server 401 using a certificate associated with server 401

At step 418, the secure application 403 selects a transport key from the crypto library and decrypts LUK_(En(tr)), and the data type identifier if encrypted. The secure application 403 determines that the data type identifier indicates the sensitive data to store is a cryptogram generation key (e.g., a limited-use key), and re-encrypts the token using a storage key selected from the crypto library. The storage key is selected based on the data type identifier. For example, since the data type of the sensitive data is a cryptogram generation key, the secure application 403 selects a key-storage key to re-encrypt the cryptogram generation key to generate the re-encrypted cryptogram generation key (“LUK_(En(k-s))”). At step 419, the secure application 403 stores the re-encrypted cryptogram generation key LUK_(En(k-s)) outside the trusted execution environment by returning LUK_(En(k-s)) to the mobile application 402. At step 420, the mobile application 402 stores LUK_(En(k-s)) in the application storage 404.

FIG. 5 shows a flow diagram 500 of a mobile application 501 conducting a transaction with an access device 502, according to some embodiments. At step 511, the mobile application 501 may interact with access device 502 to initiate a transaction. For example, the mobile application 501 may communicate with access device 502 when the communication device 505 is brought in proximity to the access device 502. As described above, the mobile application 501 running on the communication device 505 may communicate with the access device 502 over a contactless interface. At step 512, the access device 502 provides transaction data to the mobile application 501. The transaction data may include, for example, a transaction amount, a transaction date, an unpredictable number from the access device 502, and/or other dynamic transaction data.

At step 513, the mobile application 501 retrieve a token or other account identifier stored in the application storage 504.-The token or other account identifier may have been stored in the application storage 504 as described above with respect to FIG. 4. Thus, the token or other account identifier may have been previously encrypted using a token-storage key, and the token or other account identifier retrieved can be an encrypted token or other account identifier (“Token_(En(t-s))”). At step 514, the application storage 504 returns Token_(En(t-s)) to the mobile application 501.

At step 515, the mobile application 501 may send Token_(En(t-s)) and a data type identifier to the secure application 503. The data type identifier may indicate the data being send is a token (“Type(t)”). In some embodiments, the data type identifier can be encrypted as well. At step 516, the secure application 503 decrypts the data type identifier if encrypted, and selects a storage key from a crypto library based on the data type as indicated by the data type identifier. For example, since the data type identifier indicates that the data is a token, the secure application 503 may select a token-storage key to decrypt Token_(En(t-s)). At step 517, the secure application 503 returns the decrypted token to the mobile application 501.

The mobile application 502 can request the secure application 503 to generate a transaction cryptogram via an API. At step 518, the mobile application 501 may retrieve a cryptogram generation key (e.g., a limited-used key) from the secure application 503. The cryptogram generation key may have been stored in the application storage 504 as described above with respect to FIG. 4. Thus, the cryptogram generation key may have been previously encrypted using a key-storage key, and the cryptogram generation key retrieved can be an encrypted cryptogram generation key (“LUK_(En(k-s))”). At step 519, the application storage 504 returns LUK_(En(k-s)) to the mobile application 501.

At step 520, the mobile application 501 may send a cryptogram generation request to the secure application 503. The cryptogram generation request may include LUK_(En(k-s)), a data type identifier indicating that the data is a key (“Type(k)”), and the transaction data. In some embodiments, the data type identifier can be encrypted as well. At step 521, the secure application 503 decrypts the data type identifier if encrypted, and selects a storage key from a crypto library based on the data type of the data. For example, since the data type identifier indicates that the data is a key, the secure application 503 may select a key-storage key to decrypt LUK_(En(k-s)). The secure application 503 may then generate a transaction cryptogram by encrypting the transaction data using the decrypted cryptogram generation key. At step 522, the secure application 503 returns the generated transaction cryptogram to the mobile application 501. At step 523, the mobile application 501 sends the decrypted token and the transaction cryptogram to the access device 502 to conduct the transaction.

FIG. 6 illustrates a flow chart 600 of a method for managing sensitive data on a portable communication device, according to some embodiments. The portable communication device may have a mobile application executing in an application execution environment and a secure application executing in a trusted execution environment. The application execution environment and the trusted execution environment may be configured as described above with respect to FIGS. 2 and 3. The method may begin at step 601. At step 601, the secure application receives a storage request from the mobile application. The storage request is a request to store sensitive data. The storage request may include an encrypted data type identifier and encrypted sensitive data. In some embodiments, the encrypted sensitive data was received by the mobile application from a server, and the encrypted sensitive data is signed by the server. In some embodiments, the storage request can be in the form of an API call for storing sensitive data as described above with respect to FIG. 4.

At step 602, the secure application decrypts the encrypted data type identifier and the encrypted sensitive data using a transport key. The secure application may also verify that the encrypted sensitive data was signed by the server using a certificate associated with the server. At step 603, the secure application determines the data type of the sensitive data based on the data type identifier. For example, the secure application may determine the data type identifier indicates that the sensitive data is a cryptogram generation key such as a limited-use key, or that the data type identifier indicates that the sensitive data is a token or other account identifier.

At step 604, the secure application re-encrypts the sensitive data using a storage key to generate re-encrypted sensitive data. In some embodiments, different storage keys can be used for different data types. For example, when the sensitive data is a cryptogram generation key such as a limited-use key, the secure application may re-encrypt the cryptogram generation key using a key-storage key to generate a re-encrypted cryptogram generation key. When the sensitive data is a token or other account identifier, the secure application may re-encrypt the token or other account identifier using a token-storage key to generate a re-encrypted token or other account identifier. At step 605, the secure application may store the re-encrypted sensitive data in a memory of the portable communication device which is outside the trusted execution environment. For example, the secure application may send the re-encrypted sensitive data to the mobile application for storage in the application storage area of the application execution environment of the portable communication device.

FIG. 7 illustrates a flow chart 700 of a method for generating a transaction cryptogram, according to some embodiments. At step 701, the secure application may receive a cryptogram generation request from the mobile application to generate a transaction cryptogram. The cryptogram generation request may include a re-encrypted cryptogram generation key (e.g., limited-use key) and transaction data. The transaction data may have been received by the mobile application from an access device. At step 702, the secure application may decrypt the re-encrypted cryptogram generation key using a key-storage key. At step 704, the secure application may encrypt the transaction data using the decrypted cryptogram generation key to generate a transaction cryptogram. At step 706, the secure application may send the generated transaction cryptogram to the mobile application. The secure application may also decrypt a re-encrypted token or other account identifier using a token-storage key, and send the decrypted token or other account identifier to the mobile application. The mobile application may then transmit the generated transaction cryptogram and the token or other account identifier to the access device to conduct a transaction.

FIG. 8 illustrates a flow chart 800 of a method for replenishing account parameters to a portable communication device, according to some embodiments. At step 801, the secure application may receive a replenishment request from the mobile application. The replenishment request can be, for example, a key replenishment request to request a new cryptogram generation key such as a new limited-use key. The replenishment request may include a re-encrypted cryptogram generation key and a transaction verification log containing transaction data for previous transactions conducted using the current set of account parameters. At step 802, the secure application may decrypt the re-encrypted cryptogram generation key using a key-storage key. At step 803, the secure application may generate a hash value that is computed over at least the transaction verification log using the decrypted cryptogram generation key. The hash value can be, for example, a message authentication code. At step 804, the secure application sends the hash value to the mobile application. The mobile application may then send the hash value to a remote server. The remote server may verify the hash value against its record of past transactions conducted using the mobile application, and provide the portable communication device with a new set of account parameters (e.g., a new cryptogram generation key such as a limited-use key, or a new token or other account identifier).

Embodiments of the disclosure are not limited to the above-described embodiments. For example, although separate functional blocks are shown for an issuer server, transaction processing network server, and acquirer, some entities may perform a combination or all of these functions and may be included in some embodiments.

Any of the computing devices, communication devices, computers, servers, and the like described herein can be implemented using one or more processors coupled to a memory that store code or instructions, which when executed by the one or more processors, cause the device to perform one or more of the methods and processes described herein. Memory, storage media, and computer-readable media for containing code, or portions of code described herein, can include any appropriate media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage and/or transmission of information such as computer-readable instructions, data structures, program modules, or other data, including RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, data signals, data transmissions, or any other medium which can be used to store or transmit the desired information and which can be accessed by the computer. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art will appreciate other ways and/or methods to implement the various embodiments.

Specific details regarding some of the above-described aspects are provided above. The specific details of the specific aspects may be combined in any suitable manner without departing from the spirit and scope of embodiments of the disclosure. For example, back end processing, data analysis, data collection, and other transactions may all be combined in some embodiments of the disclosure. However, other embodiments of the disclosure may be directed to specific embodiments relating to each individual aspect, or specific combinations of these individual aspects.

The methods and processes described herein are exemplary in nature, and the methods and processes in accordance with some embodiments may perform one or more of the steps in a different order than those described herein, include one or more additional steps not specially described, omit one or more steps, combine one or more steps into a single step, split up one or more steps into multiple steps, and/or any combination thereof.

It should be understood that the present disclosure as described above can be implemented in the form of control logic using computer software (stored in a tangible physical medium) in a modular or integrated manner. The present disclosure may also be implemented in other ways and/or methods using hardware and a combination of hardware and software.

Any of the software components or functions described in this application, may be implemented as software code to be executed by a processor using any suitable computer language such as, for example, Java, C++ or Perl using, for example, conventional or object-oriented techniques. The software code may be stored as a series of instructions, or commands on a computer readable medium, such as a random access memory (RAM), a read only memory (ROM), a magnetic medium such as a hard-drive or a floppy disk, or an optical medium such as a CD-ROM. Any such computer readable medium may reside on or within a single computational apparatus, and may be present on or within different computational apparatuses within a system or network.

The above description is illustrative and is not restrictive. Many variations of the disclosure will become apparent to those skilled in the art upon review of the disclosure. The scope of the disclosure should, therefore, be determined not with reference to the above description, but instead should be determined with reference to the pending claims along with their full scope or equivalents.

One or more features from any embodiment may be combined with one or more features of any other embodiment without departing from the scope of the disclosure.

A recitation of “a”, “an” or “the” is intended to mean “one or more” unless specifically indicated to the contrary.

All patents, patent applications, publications, and descriptions mentioned above are herein incorporated by reference in their entirety for all purposes. None is admitted to be prior art. 

What is claimed is:
 1. A portable communication device comprising: one or more processor circuits; and one or more memory units coupled to the one or more processor circuits and storing computer readable code implementing a secure application in a trusted execution environment, which when executed by the one or more processor circuits, performs operations including: receiving, by the secure application from a mobile application executing in an application execution environment of the portable communication device, a first storage request to store first sensitive data, the first storage request including a first encrypted data type identifier and first encrypted sensitive data; decrypting, by the secure application, the first encrypted data type identifier and the first encrypted sensitive data using a transport key; determining, by the secure application, that the first data type identifier indicates the first sensitive data is a cryptogram generation key; re-encrypting, by the secure application, the first sensitive data using a key-storage key to generate a re-encrypted cryptogram generation key; and storing the re-encrypted cryptogram generation key outside the trusted execution environment.
 2. The portable communication device of claim 1, wherein the operations further includes: receiving, by the secure application from the mobile application, a second storage request, the second storage request including a second encrypted data type identifier and second encrypted sensitive data; decrypting, by the secure application, the second encrypted data type identifier and the second encrypted sensitive data using the transport key; determining, by the secure application, that the second data type identifier indicates the second sensitive data to store is a token; re-encrypting, by the secure application, the second sensitive data using a token-storage key to generate a re-encrypted token; and storing the re-encrypted token outside the trusted execution environment.
 3. The portable communication device of claim 2, wherein the operations further includes: receiving, by the secure application from the mobile application, a cryptogram generation request to generate a transaction cryptogram, the cryptogram generation request including the re-encrypted cryptogram generation key and transaction data; decrypting, by the secure application, the re-encrypted cryptogram generation key using the key-storage key; encrypting, by the secure application, the transaction data using the decrypted cryptogram generation key to generate the transaction cryptogram; and sending, by the secure application to the mobile application, the generated transaction cryptogram.
 4. The portable communication device of claim 3, wherein the transaction data is received by the mobile application from an access device, and the mobile application transmits the generated transaction cryptogram to the access device to conduct a transaction.
 5. The portable communication device of claim 3, wherein the operations further includes: decrypting, by the secure application, the re-encrypted token using the token-storage key; and sending, by the secure application to the mobile application, the decrypted token.
 6. The portable communication device of claim 1, wherein the cryptogram generation key is a limited-use key.
 7. The portable communication device of claim 6, wherein the operations further includes: receiving, by the secure application from the mobile application, a key replenishment request, the key replenishment request including the re-encrypted cryptogram generation key and a transaction verification log; decrypting, by the secure application, the re-encrypted cryptogram generation key using the key-storage key; generating, by the secure application, a hash value computed over at least the transaction verification log using the decrypted cryptogram generation key; and sending, by the secure application to the mobile application, the hash value.
 8. The portable communication device of claim 7, wherein the mobile application sends the hash value to a server to request a new limited-use key.
 9. The portable communication device of claim 1, wherein the first encrypted sensitive data is received by the mobile application from a server, and the first encrypted sensitive data is signed by the server.
 10. The portable communication device of claim 9, wherein the operations further includes: verifying, by the secure application, that the first encrypted sensitive data was signed by the server using a certificate associated with the server.
 11. A method for managing sensitive data in a portable communication device having a mobile application executing in an application execution environment and a secure application executing in a trusted execution environment, the method comprising: receiving, by the secure application from the mobile application, a first storage request to store first sensitive data, the first storage request including a first encrypted data type identifier and first encrypted sensitive data; decrypting, by the secure application, the first encrypted data type identifier and the first encrypted sensitive data using a transport key; determining, by the secure application, that the first data type identifier indicates the first sensitive data is a cryptogram generation key; re-encrypting, by the secure application, the first sensitive data using a key-storage key to generate a re-encrypted cryptogram generation key; and storing the re-encrypted cryptogram generation key in a memory of the portable communication device which is outside the trusted execution environment.
 12. The method of claim 11, further comprising: receiving, by the secure application from the mobile application, a second storage request, the second storage request including a second encrypted data type identifier and second encrypted sensitive data; decrypting, by the secure application, the second encrypted data type identifier and the second encrypted sensitive data using the transport key; determining, by the secure application, that the second data type identifier indicates the second sensitive data to store is a token; re-encrypting, by the secure application, the second sensitive data using a token-storage key to generate a re-encrypted token; and storing the re-encrypted token in the memory of the portable communication device which is outside the trusted execution environment.
 13. The method of claim 12, further comprising: receiving, by the secure application from the mobile application, a cryptogram generation request to generate a transaction cryptogram, the cryptogram generation request including the re-encrypted cryptogram generation key and transaction data; decrypting, by the secure application, the re-encrypted cryptogram generation key using the key-storage key; encrypting, by the secure application, the transaction data using the decrypted cryptogram generation key to generate the transaction cryptogram; and sending, by the secure application to the mobile application, the generated transaction cryptogram.
 14. The method of claim 13, wherein the transaction data is received by the mobile application from an access device, and the mobile application transmits the generated transaction cryptogram to the access device to conduct a transaction.
 15. The method of claim 13, further comprising: decrypting, by the secure application, the re-encrypted token using the token-storage key; and sending, by the secure application to the mobile application, the decrypted token.
 16. The method of claim 11, wherein the cryptogram generation key is a limited-use key.
 17. The method of claim 16, further comprising: receiving, by the secure application from the mobile application, a key replenishment request, the key replenishment request including the re-encrypted cryptogram generation key and a transaction verification log; decrypting, by the secure application, the re-encrypted cryptogram generation key using the key-storage key; generating, by the secure application, a hash value computed over at least the transaction verification log using the decrypted cryptogram generation key; and sending, by the secure application to the mobile application, the hash value.
 18. The method of claim 17, wherein the mobile application sends the hash value to a server to request a new limited-use key.
 19. The method of claim 11, wherein the first encrypted sensitive data is received by the mobile application from a server, and the first encrypted sensitive data is signed by the server.
 20. The method of claim 19, further comprising: verifying, by the secure application, that the first encrypted sensitive data was signed by the server using a certificate associated with the server. 